From: Giuseppe Scrivano Date: Thu, 2 Apr 2015 12:21:52 +0000 (+0200) Subject: tests: skip test-commit-sign.sh when not root X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~817 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d3545b0661f3247cd8c106e64a71052ce9952243;p=ostree.git tests: skip test-commit-sign.sh when not root Signed-off-by: Giuseppe Scrivano --- diff --git a/tests/test-commit-sign.sh b/tests/test-commit-sign.sh index 78483247..01a3a2ed 100755 --- a/tests/test-commit-sign.sh +++ b/tests/test-commit-sign.sh @@ -23,6 +23,12 @@ if ! ${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'; then exit 77 fi +# Skip the test when non-root as gpgme would not read files owned by +# another user. +if test "$(id -i)" != "0"; then + exit 77 +fi + . $(dirname $0)/libtest.sh keyid="472CDAFA"